package com.chee.plant.hibernate.object;

import java.util.Calendar;

import com.chee.plant.hibernate.object.base.BaseUser;

public class User extends BaseUser {
	private static final long serialVersionUID = 1L;

	/* [CONSTRUCTOR MARKER BEGIN] */
	public User() {
		super();
	}

	/**
	 * Constructor for primary key
	 */
	public User(java.lang.Integer id) {
		super(id);
	}

	/**
	 * Constructor for required fields
	 */
	public User(java.lang.Integer id, java.lang.Integer type,
			java.lang.String name, java.lang.String password,
			java.lang.String userKey, java.lang.String nickName,
			java.lang.String email, java.lang.String picture,
			java.lang.Integer gender, java.lang.Integer cropExp,
			java.lang.Integer cropLevel, java.lang.Integer money,
			java.lang.Integer gold, java.util.Date created,
			java.lang.String createIp, java.util.Date loginTime,
			java.lang.String loginIp, java.lang.Integer status) {

		super(id, type, name, password, userKey, nickName, email, picture,
				gender, cropExp, cropLevel, money, gold, created, createIp,
				loginTime, loginIp, status);
	}

	// 为查询用户的头像，种植经验和等级金币数量而设定的构造方法
	public User(java.lang.String picture, java.lang.Integer cropExp,
			java.lang.Integer cropLevel, java.lang.Integer gold) {
		super(picture, cropExp, cropLevel, gold);
	}

	/* [CONSTRUCTOR MARKER END] */
	public void setDefaults() {
		this.setId(0);
		this.setType(0);
		this.setName("");
		this.setPassword("");
		this.setUserKey("");
		this.setNickName("");
		this.setEmail("");
		this.setPicture("");
		this.setGender(0);
		this.setCropExp(0);
		this.setCropLevel(0);
		this.setMoney(0);
		this.setGold(0);
		this.setCreated(Calendar.getInstance().getTime());
		this.setCreateIp("");
		this.setLoginTime(Calendar.getInstance().getTime());
		this.setLoginIp("");
		this.setStatus(0);
	}

}